﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.Collections;
using System.Collections.ObjectModel;
using System.IO;
using System.Xml;
using System.Reflection;
using System.Windows.Forms;

namespace Liquid.Windows.Commands {
	[Designer(typeof(Liquid.Windows.Design.Commands.CommandSetDesigner))]
	public class CommandSet : Component {
		public CommandSet() {
			m_Commands = new CommandCollection(this);
		}

		[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
		public CommandCollection Commands { get { return m_Commands; } }
		private CommandCollection m_Commands;

		public event CommandEventHandler CommandAdded;
		internal void OnCommandAdded(CommandEventArgs e) {
			var handler = CommandAdded;
			if (handler != null)
				handler(this, e);
		}
		public event CommandEventHandler CommandRemoved;
		internal void OnCommandRemoved(CommandEventArgs e) {
			var handler = CommandRemoved;
			if (handler != null)
				handler(this, e);
		}
	}
}
